<?php

namespace common\models\db\tables;

use Yii;

/**
 * This is the model class for table "{{%spu_has_remote_freights}}".
 *
 * @property int $id
 * @property int $spu_id
 * @property int $province_id
 * @property float $append_freight_price
 * @property int $created_at
 * @property int $updated_at
 */
class SpuHasRemoteFreights extends \yii\db\ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return '{{%spu_has_remote_freights}}';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['spu_id', 'province_id', 'append_freight_price', 'created_at', 'updated_at'], 'trim'],
            [['spu_id', 'province_id', 'created_at', 'updated_at'], 'required'],
            [['spu_id', 'province_id', 'created_at', 'updated_at'], 'integer'],
            [['append_freight_price'], 'number'],
            [['append_freight_price'], 'default', 'value' => 0.00],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'id' => Yii::t('app', 'ID'),
            'spu_id' => Yii::t('app', 'Spu ID'),
            'province_id' => Yii::t('app', 'Province ID'),
            'append_freight_price' => Yii::t('app', 'Append Freight Price'),
            'created_at' => Yii::t('app', 'Created At'),
            'updated_at' => Yii::t('app', 'Updated At'),
        ];
    }
}
